package com.m7788.util;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.tool.utils.DataUtil;

public class MyBroadcastReceiver extends BroadcastReceiver { 
     
    public MyBroadcastReceiver () { 
    } 
    @Override 
    public void onReceive(Context context, Intent intent) { 
    	Bundle bundle = intent.getExtras();
 	    int operation = bundle.getInt("operation",-1);
 	    String  desc = bundle.getString("desc");
    	if(intent.getAction().equals(Constant.ACTION_STOA)){
    		if(operation==2){
    			if(desc!=null &&desc.length()>0){
    				DataUtil.showShortToast(context, desc);
    				
    			}
	    		   
	    	}else if(operation==3){
	    		if(desc!=null &&desc.length()>0){
	    			desc = AppUtil.UnicodeToGB2312(desc);
    				DataUtil.showShortToast(context, desc);
    			}
	    	}
    	}      
    } 
 
} 